package com.shop.common;

import com.shop.Utils.TokenUtils;
import com.shop.dao.UserMapper;
import com.shop.pojo.Message;
import com.shop.pojo.User;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.springframework.stereotype.Service;

import java.io.InputStream;

@Service
public class TokenService {
    public String getUsername(String Authorization) throws Exception{
        String[] strAry = TokenUtils.yanzhen(Authorization);
            String username = strAry[0];
            return username;
    }
}
